﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using SSISFromCode.Events;

namespace SSISFromCode.Junk
{
    internal class PackageRunner
    {
        public void Execute( string packagePath )
        {
            try
            {
                var app = new Application();
                var p = app.LoadPackage( packagePath, null );  // passing the events here no worky
                //p.Execute( null, null, new PackageEvents(), null, null );
                Console.WriteLine( "---" );
                Console.WriteLine( "sho nuff" );
            }
            catch ( Exception e )
            {
                Console.WriteLine( e.Message );
            }
        }
    }
}
